pp108 : onchange Event (XGrid)

onchange Event (XGrid)


This event is executed when the value or content of a cell is changed. When a cell is modified, the value of the dataNode corresponding to the cell is updated. In case the dataNode does not exist, it is automatically created.

The cell value update and dataNode creation occur after theonchangeevent has been executed. This enables you to create the dataNode yourself.

Syntax

Inline HTML
<div cordysType="wcp.library.ui.XGrid" id="xgridId ()">
    <div id="columnId" onchange="handler" ref="columnRef">columnLabel</div>
  ...
</div>


Event Information

To invoke Invoked by a change in the content of the cell.
Default Action Initiates any action associated with this event.


Event Object Properties


Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Property Description
businessObject XML node of the business object associated with the row.
className String. Refers to the CSS class associated with the cell.
columnId Read-only. String that refers to the identifier of the column of the cell, for which the event is executed.
data XML node that is the basis for the content in the XGrid.
dataNode XML data node associated with the cell.
getCells() Returns an array of cell objects.
getIndex() Returns the row index, where the index of the first row is '1'.
oldValue The value of the cell, before modification.
returnValue Boolean. When set to False, the (un)check of the row is cancelled.
row Refers to the HTML node of the unfrozen part of a row.
rowData XML node of the data corresponding to a row.
rowFreezeColumn Refers to the HTML node of the frozen part (if any) of a row.
srcElement HTML node of the cell being modified.
title String, to link a tooltip to the cell.
value The value or content to be displayed in the cell.


Remarks

The onchange event is executed before the onblur event. The className event property allows simple styling changes to the cell. The following styling properties are supported:

  • background-color
  • color
  • cursor
  • direction
  • text (-align, -autospace, -decoration, -transform)
  • font (-family, -style, -variant, -weight)
  • letter-spacing
  • word-spacing

Example


To view an example, see onbeforedatabind.

See Also


xgrid, onbeforedatabind